home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Compilers⁄Interps / GCC-2.3.3r12 / Misc / cond.awk < prev    next >
Encoding:
Text File  |  1993-02-05  |  410 b   |  11 lines  |  [TEXT/MPS ]

  1. # Simpleminded conditional-processor awk script
  2. # to permit use of a single .y source file for C and Objective C.
  3. # If objc=1, the ifobjc conditionals succeed.
  4. # If objc=0, the ifc conditionals succeed.
  5. /^ifobjc$/,/^end ifobjc$/ \
  6.   { if (objc != 0 && $0 != "ifobjc" && $0 != "end ifobjc") print; next }
  7. /^ifc$/,/^end ifc$/       \
  8.   { if (objc == 0 && $0 != "ifc" && $0 != "end ifc") print; next }
  9.  
  10. { print }
  11.